package com.fly.studio.home.app.concurrency;

import com.jd.platform.async.wrapper.WorkerWrapper;

import java.util.Map;

/**
 * @author fuliying3
 * @date 2022/09/05 20:31:00
 */
public class ParWorker2 implements FloorWorker {

    @Override
    public String action(String s, Map<String, WorkerWrapper> map) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
            Thread.currentThread().interrupt();
        }
        System.out.println("ParWorker2 execute param " + s);
        return "ParWorker2 result ";
    }

    @Override
    public String defaultValue() {
        return "ParWorker2--default";
    }
}